package com;

import com.websocket.WebSocketServiceChat;
import com.websocket.WebSocketServiceDanmu;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(scanBasePackages = {"com", "com.service", "com.service.impl"})
@EnableAsync
@EnableTransactionManagement
//@EnableFeignClients(basePackages = "com.imooc.bilibili.service.feign")
@MapperScan("com.mapper")
public class ImoocBilibiliApp {

    public static void main(String[] args) {
        ApplicationContext app = SpringApplication.run(ImoocBilibiliApp.class, args);
        WebSocketServiceDanmu.setApplicationContext(app);
        WebSocketServiceChat.setApplicationContext(app);
    }
}
